regex that all matches blank line
A regular expression that matches blank lines (lines that contain only whitespace or are completely empty) is:
^\s*$
Explanation:
^
→ Matches the beginning of the line.\s*
→ Matches zero or more whitespace characters (spaces, tabs, etc.).$
→ Matches the end of the line.
This regex ensures that lines that contain only whitespace (or nothing at all) are matched.